window.onload=function(){divtoshow();}
		//显示百度地图弹出层
		function divtoshow() {
			div_show = document.getElementById("div_show");
          	div_show.innerHTML = "";
			getshade();
			getpopup();
			getbaidumap(113.837, 22.745);			
	}
		//创建遮罩层
		function getshade() {
			var div = document.createElement("div");
			div.innerHTML = "<div id=\"div_hotelmap\" ></div>";
			div.style.width = Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth) + "px";
			div.style.height = Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight) + "px";
			div.style.position = "absolute";
			div.style.opacity = 1;
			div.style.left = 0;
			div.style.top = "0px";
			div.style.height="100%"
			div.style.bottom="51px";
			div.id = "tohotelshade";
			div.style.zIndex = 100;
			document.getElementById("allmap").appendChild(div);
		}

		//创建用于显示百度地图的DIV
		function getpopup() {
			var div = document.createElement("div");
			div.style.width = "100%";
			div.style.height = "100%";
			div.id = "tohotelmap";
			document.getElementById("div_hotelmap").appendChild(div);
		}


		//通过经纬度显示百度地图
		function getbaidumap(Longitude, Latitude) {
			var map = new BMap.Map("tohotelmap");
			var point = new BMap.Point(Longitude, Latitude);
			map.centerAndZoom(point, 15);
			var myIcon = new BMap.Icon("../public/cache/scanss.gif", new BMap.Size(300,300));  
			var marker = new BMap.Marker(point,{icon:myIcon});  // 创建标注
			map.addOverlay(marker); // 将标注添加到地图中
			var lables= new BMap.Label("<div class='box'><span class='d'>正在为你联系司机</span></div>",{offset:new BMap.Size(65,35)});
			
			marker.setLabel(lables);
			function addMarker(point){
		  		var marker = new BMap.Marker(point);
			 	 map.addOverlay(marker);
			}

	// 随机向地图添加5个标注
	var bounds = map.getBounds();
	var sw = bounds.getSouthWest();
	var ne = bounds.getNorthEast();
	var lngSpan = Math.abs(sw.lng - ne.lng);
	var latSpan = Math.abs(ne.lat - sw.lat);
	
	for (var i = 0; i < 4; i ++) {
		var point = new BMap.Point(sw.lng + lngSpan * (Math.random() * 0.7), ne.lat - latSpan * (Math.random() * 0.7));
		var point = new BMap.Point(sw.lng + lngSpan * (Math.random() * 0.7), ne.lat - latSpan * (Math.random() * 0.7));
		//var marker2 = new BMap.Marker(point);  // 创建标注
		var myIcon = new BMap.Icon("../public/cache/7.png", new BMap.Size(5,5));
		var marker2 = new BMap.Marker(point,{icon:myIcon});  // 创建标注
		map.addOverlay(marker2);
		addMarker(marker2); 
		var div = new BMap.Label("<div class='lables'><img src='../public/images/user2.jpg'/><div class='appraise-star' onclick='Cars()'>李师傅<div class='store-star'><div class='star-outer'><div class='star-inner' data-level='4.5'></div></div></div></div></div>",{offset:new BMap.Size(-40,-38)});
		marker2.setLabel(div);
		tool.calculateStarWidth();//计算等级星星的宽度
	}

}
